﻿using NoIdeaIoc;

namespace NoIdeaSelfHost.Codes;
public static class HostConfigurator
{
    #region Public Methods and Operators

    public static void UseIocContainer(this Topshelf.HostConfigurators.HostConfigurator configurator)
    {
        configurator.AddConfigurator(new HostBuilderConfigurator());
    }
    public static ILifeTime InitContainer()
    {
        var container = new DefaultContainerBuilder();
        container.AddScoped<IHostService, Service, Service>();
        return container.Populate();
    }
    #endregion
}
